package com.student.service.admin;

import com.student.dao.AdminDao;
import com.student.dao.impl.AdminDaoImpl;
import com.student.pojo.Admin;

/**
 * @author lin945
 * @date 2020/4/25 13:27
 */
public class AdminService {
    private AdminDao adminDao=new AdminDaoImpl();
    public Admin login(Admin admin){
        if (admin==null|admin.getUsername()==null|admin.getPassword()==null|!adminDao.existAdmin(admin)){
            return null;
        }
      return adminDao.querAdminByNameAndPassword(admin);
    }

    public void loginOut(){

    }


}
